package com.example.runlian.service.impl;

import com.example.runlian.mapper.MainTitleMapper;
import com.example.runlian.pojo.MainTitle;
import com.example.runlian.pojo.PageInfo;
import com.example.runlian.service.MainTitleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 主标题逻辑处理 实现
 */
@Service
public class MainTitleServiceImpl implements MainTitleService {
    @Autowired
    private MainTitleMapper mainTitleMapper;

    @Override
    public String queryMainTitleByMid(Integer mid) {
        return mainTitleMapper.queryMainTitleByMid(mid);
    }

    @Override
    public List<MainTitle> queryMainTitlesByPage(PageInfo pageInfo) {
        return mainTitleMapper.queryMainTitleByPage(pageInfo);
    }

    @Override
    public Integer queryMainTitleAllNum() {
        return mainTitleMapper.queryMainTitleAllNum();
    }

    @Override
    public Integer updateMainTitleByMid(MainTitle mainTitle) {
        return mainTitleMapper.updateMainTitleByMid(mainTitle);
    }

    @Override
    public Integer addMianTilte(MainTitle mainTitle) {
        return mainTitleMapper.addMainTitle(mainTitle);
    }

    @Override
    public Integer deleteMainTitle(Integer mid) {
        return mainTitleMapper.deleteMainTitleByMid(mid);
    }


}
